







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Finds the index of the minimum value in a list.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static int IndexOfMinimum<T>( IList<T> list ) where T : IComparable<T> |
Visual Basic (Declaration) |
---|
Public Shared Function IndexOfMinimum(Of T As IComparable(Of T)) ( _ list As IList(Of T) _ ) As Integer |
Visual C++ |
---|
public: generic<typename T> where T : IComparable<T> static int IndexOfMinimum ( IList<T>^ list ) |
Parameters
- list
- IList<(Of <T>)>
The list to search.
Return Value
The index of the smallest item in the list. If the minimum value appears multiple times, the index of the first appearance is used.
Type Parameters
- T
- The type of items in the list.
Remarks
Values in the list are compared by using the IComparable<T>
interfaces implementation on the type T.
Exceptions
Exception | Condition |
---|---|
System..::InvalidOperationException | The collection is empty. |
System..::ArgumentNullException | list is null. |
See Also
Algorithms Class
Wintellect.PowerCollections Namespace